#ifndef SYMBOLDEFINITION_H
#define SYMBOLDEFINITION_H
#include <iostream>
#include <fstream>
#include <string>

class SymbolDefinition {
    int entryNo;
    std::string symbol;
    std::string definition;
    std::string mask;
    std::string drt;
    //todo: add reference terminal is a object


public:
    SymbolDefinition();
    SymbolDefinition(const SymbolDefinition& orig);
    ~SymbolDefinition();

    void setDefinition(const std::string& definition) {
        this->definition = definition;
    }

    void setEntryNo(int entryNo) {
        this->entryNo = entryNo;
    }

    void setMask(const std::string& mask) {
        this->mask = mask;
    }

    void setSymbol(const std::string& symbol) {
        this->symbol = symbol;
    }

    void setDRT(const std::string& drt) {
        this->drt = drt;
    }

    const std::string& getDefinition() const {
        return definition;
    }

    int getEntryNo() const {
        return entryNo;
    }

    const std::string& getMask() const {
        return mask;
    }

    const std::string& getSymbol() const {
        return symbol;
    }

    const std::string& getDRT() const {
        return drt;
    }
    void print();
    friend std::ostream & operator<<(std::ostream&, const SymbolDefinition&);


};
SymbolDefinition::SymbolDefinition()
{
    symbol ="";
    definition ="";
    mask = "";
    drt = "(D:default)";
}

SymbolDefinition::~SymbolDefinition()
{
}
SymbolDefinition::SymbolDefinition(const SymbolDefinition& orig) {
    symbol = orig.symbol;
    definition = orig.definition;
    mask = orig.mask;
    drt = orig.drt;

}

void SymbolDefinition::print(){
   std::cout << this->getSymbol() << "\t" << this->getDefinition()<< "\t" << this->getMask() << "\t" << this->getDRT()<< std::endl;
}

//Overloading << for buildFile

std::ostream & operator<<(std::ostream& output, const SymbolDefinition& data)
{

        return output << data.getSymbol() << "\t" << data.getDefinition() << "\t" << data.getMask()<< "\t" << data.getDRT();
}




#endif // SYMBOLDEFINITION_H
